<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
#parse("page_include.html")
</head>
<body>
	<form id="bpmApproveForm" method="post">
		<table class="stable" cellpadding="1" cellspacing="1" style="width: 100%">
			<input type="hidden" name="piid" value="${piid}"></input>
			<input type="hidden" name="taskId" value="${taskId}"></input>
			<tr>
				<td width="25%" class="stdlabel">休假人</td>
				<td width="75%" class="stdinput">
					<input data-type="inputbox" type="text" readonly="readonly" value="fozzie" name="employeeName"
						style="width: 200px" data-defs="required:true"></input>
				</td>
			</tr>
			<tr>
				<td width="25%" class="stdlabel">休假天数</td>
				<td width="75%" class="stdinput">
					<input data-type="numberbox" type="text" value="3" name="numberOfDays" style="width: 200px"
						data-defs="required:true"></input>
				</td>
			</tr>
			<tr>
				<td width="25%" class="stdlabel">休假开始日期</td>
				<td width="75%" class="stdinput">
					<input data-type="datebox" type="text" value="2014-03-15" name="startDate" style="width: 200px"
						data-defs="required:true"></input>
				</td>
			</tr>
			<tr>
				<td width="25%" class="stdlabel">休假原因</td>
				<td width="75%" class="stdinput">
					<input data-type="inputbox" type="text" value="奶奶个熊,想休息下." name="vacationMotivation" style="width: 200px"
						data-defs="required:true"></input>
				</td>
			</tr>
			<tr>
				<td width="25%" class="stdlabel">审批意见</td>
				<td width="75%" class="stdinput">
					<input data-type="inputbox" type="text" name="managerMotivation" style="width: 500px"
						data-defs="required:true"></input>
				</td>
			</tr>
		</table>
	</form>
	<div id="tb1" style="height: auto">
		<a href="#" onclick="vacationApprove()" data-type="button" data-defs="iconCls:'icon-ok'">同意</a>
		<a href="#" onclick="vacationReject()" data-type="button" data-defs="iconCls:'icon-ok'">驳回</a>
	</div>
	<script type="text/javascript">
        function vacationApprove() {
            var url = '${rc.contextPath}/demo/vacationApprove.do?vacationApproved=true';
            var v = $("#bpmApproveForm").form('validate');
            if (!v) {
                return;
            }
            submitForm("bpmApproveForm", url, function(rs) {
                showMsg("同意.");
            });
        }
        function vacationReject() {
            var url = '${rc.contextPath}/demo/vacationApprove.do?vacationApproved=false';
            var v = $("#bpmApproveForm").form('validate');
            if (!v) {
                return;
            }
            submitForm("bpmApproveForm", url, function(rs) {
                showMsg("驳回.");
            });
        }
        function vacationProcessView() {

        }
    </script>
</body>
</html>
